#include "map.h"
#include"config.h"

Map::Map()
{
    m_map1.load(":/picture/background4.jpg");
    m_map2.load(":/picture/background4.jpg");

    //y轴
    m_map1_y=-Game_HEIGHT;
    m_map2_y=0;

    //滚动速度
    map_speed=map_Speed;
}

void Map::mapPosition()
{
    //第一张
    m_map1_y+=map_speed;
    if(m_map1_y>=0)
    {
        m_map1_y=-Game_HEIGHT;

    }
    //第二张
    m_map2_y+=map_speed;
    if(m_map2_y>=Game_HEIGHT)
    {
        m_map2_y=0;
    }
}
